package com.mall.web.control.eshop;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mall.biz.user.record.CollectionBizImpl;
import com.mall.client.eshop.EshopUserInfoService;
import com.mall.pojo.EshopUserInfo;
import com.mall.web.util.HttpUtil;

@Controller
@RequestMapping("/eshop/geren/")
public class EshopPersonalController {
	@Autowired
	private EshopUserInfoService eshopUserInfoService;
	@Autowired
	private CollectionBizImpl collectionBizImpl;
	
	public String personalCenter(HttpServletRequest request,HttpServletResponse response,ModelMap modelMap){
		Long eshopUserId = HttpUtil.getLongValueFromRequest(request, "eshopUserId");
		EshopUserInfo eshopUserInfo = this.eshopUserInfoService.getEshopUserInfoBySellerInfoId(eshopUserId);
		
		//收藏的店鋪
		this.collectionBizImpl.collectionRecordMap(request, response, modelMap);
		return "personalCenter";
	}
	
	
}
